package com.shell.scheduler.trace.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shell.bee.persistence.service.impl.PersistentServiceImpl;
import com.shell.scheduler.trace.dao.SchdTraceDao;
import com.shell.scheduler.trace.po.SchdTrace;
import com.shell.scheduler.trace.service.SchdTraceService;

import tk.mybatis.mapper.entity.Example;

@Service("schdTraceService")
public class SchdTraceServiceImpl extends PersistentServiceImpl<SchdTrace> implements SchdTraceService {
	@Autowired
	private SchdTraceDao schdTraceDao;

	public List<SchdTrace> getScheTraces(String jobCode) {
		Example example = new Example(SchdTrace.class);
		example.setOrderByClause(" job_time DESC");
		Example.Criteria criteria = example.createCriteria();
		criteria.andEqualTo("jobCode", jobCode);
		return this.schdTraceDao.selectByExample(example);
	}
}
